-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repair incorrect TCLK partner IEEE address on startup #577
Conversation
One great catch and fixing !!!(MAN this man have learning using his brain !!) I think this was also the first problems we was having with the RCP / Zigbeed was having problems with Zigbee 3 end device that was trying updating the TC-Link key and was leaving but can being one other bug / undocumented future. By the way Silab have fixing the problem with rejoining devices request there old NWK and the network is not like it and must requesting / is getting one new and we is getting it in the log. (I think the problem is not in the coordinator its in the Zigbee stack of the routers that is not liking the old MWK). |
Only for info on my armbian64 RCP test system 3.4.1.0 with 20 IKEA controllers and little more devices:
and the device card have the device updating its NWK:
Its one LIDL LED RGBWW light strip with MG21 module but the firmware is some year old so its not having the rejoining fix. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## dev #577 +/- ##
==========================================
+ Coverage 99.77% 99.79% +0.02%
==========================================
Files 67 68 +1
Lines 4855 4856 +1
==========================================
+ Hits 4844 4846 +2
+ Misses 11 10 -1
☔ View full report in Codecov by Sentry. |
For now, this code requires the latest version of EmberZNet (with NV3 token support), as EmberZNet doesn't provide a way to write link key frame counters and I don't feel comfortable automatically restoring EmberZNet backups for older firmwares. |
Is it also working with EZSP 6.10.X with NVM3 (I using it instead of the normal NCP and is adding the maximum 127 TC-Link key and extra GP functionality and is also working good for MG1X chips) or its it treated like the normal NCP firmware ? |
@MattWestb I wasn't aware of any 6.10.x firmwares that enabled the token interface so I haven't tested but as long as NV3 support is enabled along with the token interface, it should work. |
Its not so well dockumented bets is in Simplicity studio but i was founding little more in one GP paper: My Billy is using this settings if you is interested: And from the build file: NCP UART Application with multi-rail library enabled for application specefic green power gpdf transmission scheduling. This network coprocessor (NCP) application is an extension to the standard ncp-uart-hw sample application with following changes Application configuration :
This application implements a simple gp tx queue, the size of this queue can be configured by defining EMBER_APPL_GP_BIDIRECTIONAL_TX_QUEUE_SIZE. The working of the queue is very simple, the host inititialises and submits the out going GPDF packets against GPD address, the queue holds it. When a GPDF is This application implements following custom EZSP commands as the queue interface EMBER_CUSTOM_EZSP_COMMAND_INIT_APP_GP_TX_QUEUE : Initialise and clears the application specefic GP outgoing tx queue. A test api for sending raw command out using the additioanl RAIL handle. I shall testing it later but im little busy some days ahead but shall making it after that. PS Some toya / LIDL ZBGW have start testing one version of EZSP 6.10.7.0 and its looks working OK but i dont knowing how many its using it. Edit: Ops was forgetting: Great work done !!!!!!! |
I have sent you one mail with ZHA logs and zigbee DB if you like looking after updating to HA 2023.09 but i dont have any problems in my production system that is running NCP EZSP 6.10.7. with NVM3 token storage. |
This PR is a little experimental and relies on functionality present only in the latest build of EmberZNet (7.3.1.0). I haven't yet figured out which firmwares are affected or what conditions are needed to trigger this problem.
There seem to be circumstances where the Trust Center Link Key's partner IEEE address does not match the coordinator's. This causes new Zigbee 3.0 devices which request APS link keys to leave the network, since the coordinator will never respond :
It looks like the device's current EUI64 is not being correctly read by the firmware when we do not pass an EUI64 when creating the initial security state:
The device's IEEE address is
79:50:12:76:46:fb:10:f4
but there seems to be a key table entry for00:12:4b:00:1c:a1:b8:46
, its original IEEE address (burned intoUSERDATA
). Upon applying this fix, the device now joins as expected:Related: home-assistant/core#97601